﻿using MediatR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NationalD3.Domain.Events
{
        /// <summary>
        /// 抽象类Message，用来获取我们事件执行过程中的类名
        /// 然后并且添加聚合根
        /// </summary>
        public abstract class EventMessage : IRequest
        {
            public string MessageType { get; protected set; }
            public Guid AggregateId { get; protected set; }

            protected EventMessage()
            {
                MessageType = GetType().Name;
            }
        }
    
}
